import xml.etree.ElementTree as et

stu = et.Element('Student')

name = et.SubElement(stu, 'Name')
name.attrib = {'lang', 'en'}
name.text = 'cheng'

age = et.SubElement(stu, 'Age')
age.text = 28

et.dump(stu)
